#include<bits/stdc++.h>

using namespace std;

double f() {
    string str;
    cin >> str;
    istringstream iss(str);
    double x;
    if (iss >> x) {
        return x;
    } else {
        double a = f();
        double b = f();
        double c = 0;
        switch (str[0]) {
            case '+':
                c = a + b;
                break;
            case '-':
                c = a - b;
                break;
            case '*':
                c = a * b;
                break;
            case '/':
                c = a / b;
                break;
            default:
                break;
        }
        return c;
    }

}

int main() {
    cout << fixed << setprecision(2) << f() << endl;

}


